<!DOCTYPE html>
<html lang="zh-CN">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <script src="https://unpkg.com/@tailwindcss/browser@4"></script>
    <link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.7.2/css/all.min.css" rel="stylesheet">
    <title>智能健身房 - 边缘计算系统</title>
    <style>
        body {
            background-image: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), url('https://images.unsplash.com/photo-1571902943202-507ec2618e8f?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=1975&q=80');
            background-size: cover;
            background-position: center;
            background-attachment: fixed;
            display: grid;
            grid-template-rows: auto 1fr;
            min-height: 100vh;
            font-family: 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
        }
        
        /* 新版登录表单样式 */
        .login-container {
            display: flex;
            justify-content: center;
            align-items: center;
            margin: 20px 0;
            min-height: 80vh;
        }
        
        .login-card {
            width: 420px;
            background: rgba(15, 23, 42, 0.85);
            border-radius: 16px;
            box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
            backdrop-filter: blur(8px);
            padding: 2.5rem;
            border: 1px solid rgba(255, 255, 255, 0.1);
            transform: translateY(0);
            transition: all 0.3s ease;
            position: relative;
            overflow: hidden;
        }
        
        .login-card:hover {
            transform: translateY(-5px);
            box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
        }
        
        .login-card::before {
            content: '';
            position: absolute;
            top: -50%;
            left: -50%;
            width: 200%;
            height: 200%;
            background: linear-gradient(
                to bottom right,
                rgba(59, 130, 246, 0.1),
                rgba(99, 102, 241, 0.1),
                rgba(168, 85, 247, 0.1)
            );
            transform: rotate(45deg);
            z-index: -1;
        }
        
        .login-header {
            text-align: center;
            margin-bottom: 2rem;
        }
        
        .login-header h2 {
            font-size: 1.75rem;
            font-weight: 700;
            color: #fff;
            margin-bottom: 0.5rem;
            letter-spacing: 1px;
        }
        
        .login-header p {
            color: #94a3b8;
            font-size: 0.875rem;
        }
        
        .login-header i {
            font-size: 2.5rem;
            color: #3b82f6;
            margin-bottom: 1rem;
            display: inline-block;
        }
        
        .login-form .form-group {
            margin-bottom: 1.5rem;
        }
        
        .login-form label {
            display: block;
            margin-bottom: 0.5rem;
            font-size: 0.875rem;
            font-weight: 500;
            color: #e2e8f0;
        }
        
        .login-form input {
            width: 100%;
            padding: 0.85rem;
            border: 1px solid #334155;
            border-radius: 8px;
            background-color: rgba(15, 23, 42, 0.7);
            transition: all 0.3s ease;
            color: #f8fafc;
            font-size: 0.95rem;
        }
        
        .login-form input::placeholder {
            color: #64748b;
        }
        
        .login-form input:focus {
            outline: none;
            border-color: #3b82f6;
            box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.3);
            background-color: rgba(15, 23, 42, 0.9);
        }
        
        .login-btn {
            width: 100%;
            padding: 0.85rem;
            background: linear-gradient(to right, #3b82f6, #6366f1);
            color: white;
            border: none;
            border-radius: 8px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.3s ease;
            letter-spacing: 1px;
            text-transform: uppercase;
            font-size: 0.9rem;
            margin-top: 0.5rem;
        }
        
        .login-btn:hover {
            background: linear-gradient(to right, #2563eb, #4f46e5);
            transform: translateY(-2px);
            box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
        }
        
        .login-footer {
            text-align: center;
            margin-top: 2rem;
            font-size: 0.75rem;
            color: #64748b;
        }
        
        .divider {
            display: flex;
            align-items: center;
            margin: 1.5rem 0;
            color: #64748b;
            font-size: 0.75rem;
        }
        
        .divider::before,
        .divider::after {
            content: "";
            flex: 1;
            border-bottom: 1px solid #334155;
        }
        
        .divider::before {
            margin-right: 0.75rem;
        }
        
        .divider::after {
            margin-left: 0.75rem;
        }
        
        .social-login {
            display: flex;
            justify-content: center;
            gap: 1rem;
            margin: 1.5rem 0;
        }
        
        .social-btn {
            width: 40px;
            height: 40px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            color: white;
            background: rgba(255, 255, 255, 0.1);
            transition: all 0.3s ease;
        }
        
        .social-btn:hover {
            transform: translateY(-3px);
            background: rgba(255, 255, 255, 0.2);
        }
        
        .pulse {
            animation: pulse 2s infinite;
        }
        
        @keyframes pulse {
            0% {
                box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.7);
            }
            70% {
                box-shadow: 0 0 0 10px rgba(59, 130, 246, 0);
            }
            100% {
                box-shadow: 0 0 0 0 rgba(59, 130, 246, 0);
            }
        }
        
        .tech-badge {
            position: absolute;
            top: 15px;
            right: 15px;
            background: rgba(59, 130, 246, 0.2);
            color: #3b82f6;
            padding: 0.25rem 0.5rem;
            border-radius: 4px;
            font-size: 0.65rem;
            font-weight: 600;
            letter-spacing: 0.5px;
            border: 1px solid rgba(59, 130, 246, 0.3);
        }
        
        .error-message {
            color: #ef4444;
            font-size: 0.8rem;
            margin-top: 0.5rem;
            display: none;
        }
    </style>
</head>

<body class="font-sans">
    <!-- 导航栏 -->
    <nav class="bg-gray-900 p-4 text-white border-b border-gray-800">
        <div class="container mx-auto flex justify-between items-center">
            <div class="flex items-center space-x-2">
                <i class="fas fa-dumbbell text-blue-400 text-2xl"></i>
                <h1 class="text-2xl font-bold bg-gradient-to-r from-blue-400 to-purple-500 bg-clip-text text-transparent">智能健身房系统</h1>
            </div>
            <div class="hidden md:flex items-center space-x-6">
                <span class="text-sm text-gray-400">边缘计算驱动</span>
                <span class="text-sm text-gray-400">AI健身分析</span>
                <span class="text-sm text-gray-400">实时数据监测</span>
            </div>
        </div>
    </nav>

    <!-- 主内容 -->
    <main class="container mx-auto p-4 md:p-8">
        <!-- 新版登录表单 -->
        <div class="login-container">
            <div class="login-card pulse">
                <span class="tech-badge">EDGE COMPUTING v2.1</span>
                <div class="login-header">
                    <i class="fas fa-heartbeat"></i>
                    <h2>智能健身房系统</h2>
                    <p>基于边缘计算的AI健身分析平台</p>
                </div>
                
                <form class="login-form" id="loginForm" method="post">
                    <div class="form-group">
                        <label for="username"><i class="fas fa-user mr-2"></i>会员账号</label>
                        <input type="text" id="username" name="username" placeholder="请输入会员ID或手机号" required>
                        <div id="usernameError" class="error-message">请输入有效的用户名</div>
                    </div>
                    
                    <div class="form-group">
                        <label for="password"><i class="fas fa-lock mr-2"></i>安全密码</label>
                        <input type="password" id="password" name="password" placeholder="请输入您的密码" required>
                        <div id="passwordError" class="error-message">密码不正确</div>
                    </div>
                    
                    <button type="submit" class="login-btn">
                        <i class="fas fa-sign-in-alt mr-2"></i>登 录 系 统
                    </button>
                    
                    <div class="divider">其他登录方式</div>
                    
                    <div class="social-login">
                        <a href="#" class="social-btn" title="微信登录"><i class="fab fa-weixin"></i></a>
                        <a href="#" class="social-btn" title="指纹登录"><i class="fas fa-fingerprint"></i></a>
                        <a href="#" class="social-btn" title="人脸识别"><i class="fas fa-user-circle"></i></a>
                        <a href="#" class="social-btn" title="会员卡"><i class="fas fa-id-card"></i></a>
                    </div>
                    
                    <div class="login-footer">
                        <p>新用户? <a href="#" class="text-blue-400 hover:text-blue-300">立即注册会员</a></p>
                        <p class="mt-3 text-xs">技术支持: <span class="text-blue-400">边缘计算AI团队</span> | 服务热线: 400-706-1880</p>
                    </div>
                </form>
            </div>
        </div>
    </main>

    <script>
        document.getElementById('loginForm').addEventListener('submit', function(e) {
            e.preventDefault(); // 阻止表单默认提交行为
            
            // 获取输入值
            const username = document.getElementById('username').value;
            const password = document.getElementById('password').value;
            
            // 重置错误消息
            document.getElementById('usernameError').style.display = 'none';
            document.getElementById('passwordError').style.display = 'none';
            
            // 简单的验证逻辑
            // 这里设置了一个示例用户名和密码
            // 在实际应用中，应该从服务器验证
            const validUsername = 'admin';
            const validPassword = '123456';
            
            if (username === '') {
                document.getElementById('usernameError').style.display = 'block';
                return;
            }
            
            if (password === '') {
                document.getElementById('passwordError').textContent = '请输入密码';
                document.getElementById('passwordError').style.display = 'block';
                return;
            }
            
            if (username === validUsername && password === validPassword) {
                // 验证成功，跳转到world.html
                window.location.href = 'world.html';
            } else {
                // 验证失败，显示错误消息
                document.getElementById('passwordError').textContent = '用户名或密码不正确';
                document.getElementById('passwordError').style.display = 'block';
            }
        });
    </script>
</body>

</html>